/**
 * @Author: yqe@360shop.cn
 * @Date: 2019-10-09 17:01:31
 * @Last Modified by: yqe@360shop.cn
 * @Last Modified time: 2019-10-09 17:01:31
 */
import request from '@/utils/request'

/**
 * 获取微信配置信息
 * @param {*} params
 */
export function wxConfig(params) {
  return request({
    url: '/ShopApi/wxConfig',
    method: 'get',
    params
  })
}
/**
 * 通过微信code登录
 * @param {*} params
 */
export function loginByWxcode(params) {
  return request({
    url: '/PassportApi/loginByWxcode',
    method: 'get',
    params
  })
}

/**
 * 绑定上级
 * @param {*} params
 */
export function bindSuperior(params) {
  return request({
    url: '/UserApi/bindSuperior',
    method: 'get',
    params
  })
}

// sdk上报
export function logPost(data) {
  return request({
    url: '/report/log',
    method: 'post',
    data
  })
}

// 底部导航
export function getBottomNav(params) {
  return request({
    url: '/UserApi/getNav',
    method: 'get',
    params
  })
}

// 底部备案等信息
export function getBottomInfo(params) {
  return request({
    url: '/ShopApi/getBottom',
    method: 'get',
    params
  })
}

// 挂件信息
export function getSideNav(params) {
  return request({
    url: '/ShopApi/getSideNav',
    method: 'get',
    params
  })
}

// 会员信息
export function getUserInfo(params) {
  return request({
    url: '/UserApi/getUserInfo',
    method: 'get',
    params
  })
}

// 文字式条款体制弹框配置信息
export function getUserSystemInfo(params) {
  return request({
    url: '/ShopApi/confimUserSystemInfo',
    method: 'get',
    params
  })
}

// 文字式条款体制弹框确定
export function confirmUserSystem(data) {
  return request({
    url: '/ShopApi/confimUserSystem',
    method: 'post',
    data
  })
}

// 店铺二维码和提示
export function publicAccountInformation(params) {
  return request({
    url: '/ShopApi/publicAccountInformation',
    method: 'get',
    params
  })
}

// 判断是否仅限粉丝购买
export function followPublicCommission(params) {
  return request({
    url: '/UserApi/follow_public_commission',
    method: 'get',
    params
  })
}

// 判断是否关注了公众号
export function followPublicAccount(params) {
  return request({
    url: '/UserApi/follow_public_account',
    method: 'get',
    params
  })
}

// 微聊数据请求
export function getWlService(data) {
  return request({
    url: '/Public/getWlService',
    method: 'post',
    data
  })
}

// 向微聊发送用户信息
export function wlUserInfo(data) {
  return request({
    url: '/user/wlUserInfo',
    method: 'post',
    data
  })
}

// 终端模式
export function terminal(params) {
  return request({
    url: '/ShopApi/terminal',
    method: 'get',
    params
  })
}

// 完善手机号弹窗提交操作
export function saveAccountInfo(data) {
  return request({
    url: '/UserServiceApi/saveAccountInfo',
    method: 'post',
    data
  })
}

// 获取省份
export function getProvince(params) {
  return request({
    url: '/UserServiceApi/getProvince',
    method: 'get',
    params
  })
}

// 获取城市
export function getCity(data) {
  return request({
    url: '/UserServiceApi/getCity',
    method: 'post',
    data
  })
}

// 获取地区
export function getArea(data) {
  return request({
    url: '/UserServiceApi/getArea',
    method: 'post',
    data
  })
}

// 获取街道
export function getStreet(data) {
  return request({
    url: '/UserServiceApi/getStreet',
    method: 'post',
    data
  })
}

// 公共配置
export function getCommonConfig(params) {
  return request({
    url: '/shopApi/commonConfig',
    method: 'get',
    params
  })
}
